package com.project.livetv.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by Administrator on 2016/05/13/0013.
 */
public class PopWindowFragmentAdapter extends FragmentPagerAdapter{

    private List<Fragment> fragments;


    public PopWindowFragmentAdapter(FragmentManager fm) {
        super(fm);
    }
    public PopWindowFragmentAdapter(FragmentManager fm,List<Fragment> fragments) {
        super(fm);
        this.fragments = fragments;
    }

    @Override
    public Fragment getItem(int position) {
        return fragments.get(position);
    }

    @Override
    public int getCount() {
        return fragments==null?0:fragments.size();
    }
}
